package com.witmed.lib_base

import com.witmed.IModel
import io.reactivex.Observable
import io.reactivex.functions.Function
import io.reactivex.internal.functions.Functions
import okhttp3.RequestBody

abstract class BaseModel:IModel {
    //根据请求动态的添加RequestBody
    abstract fun request(vararg body: RequestBody):Observable<BaseEntity>

    protected fun <T> changeOB(observable: Observable<T>):Observable<T>{
        return Observable.fromArray(observable).flatMap(Functions.identity(),false,1,1)
    }
}